﻿using System.Runtime.InteropServices;

namespace CabConfigProvisioning
{
    [StructLayout(LayoutKind.Sequential)]
    public struct FciCabinetInfo
    {
        public const int CB_MAX_CABINET_NAME = 256;
        public const int CB_MAX_CAB_PATH = 256;
        public const int CB_MAX_DISK_NAME = 256;

        public ulong    cb;
        public ulong    cbFolderTresh;
        public uint     cbReservesCFHeader;
        public uint     cbReserveCFFolder;
        public uint     cbReserveCFData;
        public int      iCab;
        public int      iDisk;
        public ushort   setID;

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = CB_MAX_DISK_NAME)]
        public string   sDisk;

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = CB_MAX_CABINET_NAME)]
        public string   sCab;

        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = CB_MAX_CAB_PATH)]
        public string   sCabPath;
    }
}
